package Song.Han.day02.demo04;
/*
* 数组可以作为方法的参数，传参时传入的是数组的地址值*/
public class ArrayParam {
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5, 6};

        System.out.println(array);

        printArray(array);
        System.out.println("--------------aaa--------------");
        printArray(array);
    }

    public static void printArray(int[] array) {
        System.out.println("printArray方法收到的参数是：");
        System.out.println(array);
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
        System.out.println();
    }
}
